<?php
namespace app\api\model;

class Res extends BaseModel
{
    //banner图数据处理
    public function ctx($res)
    {
        if ($res) {
            return [
                'code' => '1',
                'data' => $res,
            ];
        } else {
            return [
                'code' => '1',
                'msg' => '未查询到数据',
            ];
        }

    }
    public function noPost()
    {
        return [
            'code' => '0',
            'msg' => '请求方式错误',
        ];
    }
    public function noParam()
    {
        return [
            'code' => '0',
            'msg' => '参数错误',
        ];
    }
}
